package com.bidevalution.business.service;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.SqlParameterSource;

import com.bidevalution.business.factory.StepJobJdbcFactory;

import java.util.List;
import java.util.Map;

public interface JdbcTemplateService {
	<T> T selectForObject(String sql, Map<String, ?> paramMap, Class<T> requiredType);

	Map<String, Object> selectForMap(String sql, Map<String, Object> paramMap);

	<T> T selectForObject(String sql, Map<String, ?> paramMap, RowMapper<T> rowMapper);

	List<Map<String, Object>> selectForList(String sql, Map<String, Object> paramMap);

	<T> List<T> selectForList(String sql, Map<String, Object> paramMap, Class<T> requiredType);

	Boolean executeProcedure(String procedureName, Object... values) throws Exception;

	void insert(String sql, Map<String, Object> paramMap);

	void update(String sql, Map<String, Object> paramMap);
	
	void insertBean(String sql, Object bean);
	
	<T> List<T> selectForList(String sql, Map<String, Object> paramMap, RowMapper<T> rowMapper);

	void bathInsert(String sql, SqlParameterSource[] batchArgs);

	void bathUpdate(String sql, SqlParameterSource[] batchArgs);
}
